package com.lagou.tool;

import lombok.Data;

@Data
public class CommonResponse<T> {

    private T t;

    private Integer code;

    private String msg;

    private CommonResponse commonResponse;

    public CommonResponse(){
        commonResponse=new CommonResponse();
    }

    public CommonResponse(int code, String msg){
        this.code=code;
        this.msg=msg;
    }

    public static CommonResponse success(){
        return new CommonResponse(200,"success");
    }

    public static CommonResponse Fail(){
        return new CommonResponse(500,"success");
    }
    public static CommonResponse FailWithMsg(String msg){
        return new CommonResponse(500,"msg");
    }
}
